package com.cjq.bean;

import java.sql.Timestamp;
import java.util.Objects;

public class WxUser {
    private Integer id;
    private String name;
    private String phone;
    private String password;
    private Timestamp createTime;
    private Timestamp loginTime;
    private String shenfen = "";

    public WxUser() {
    }

    public WxUser(Integer id, String name, String phone, String password, Timestamp createTime, Timestamp loginTime, String shenfen) {
        this.id = id;
        this.name = name;
        this.phone = phone;
        this.password = password;
        this.createTime = createTime;
        this.loginTime = loginTime;
        this.shenfen = shenfen;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    public Timestamp getLoginTime() {
        return loginTime;
    }

    public void setLoginTime(Timestamp loginTime) {
        this.loginTime = loginTime;
    }

    public String getShenfen() {
        return shenfen;
    }

    public void setShenfen(String shenfen) {
        this.shenfen = shenfen;
    }

    @Override
    public String toString() {
        return "WxUser{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", phone='" + phone + '\'' +
                ", password='" + password + '\'' +
                ", createTime=" + createTime +
                ", loginTime=" + loginTime +
                ", shenfen='" + shenfen + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        WxUser wxUser = (WxUser) o;
        return Objects.equals(id, wxUser.id) &&
                Objects.equals(name, wxUser.name) &&
                Objects.equals(phone, wxUser.phone) &&
                Objects.equals(password, wxUser.password) &&
                Objects.equals(createTime, wxUser.createTime) &&
                Objects.equals(loginTime, wxUser.loginTime) &&
                Objects.equals(shenfen, wxUser.shenfen);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, phone, password, createTime, loginTime, shenfen);
    }
}
